<?php

class WanbaOrderInfoAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
    );

    /**
     * @param $userId
     * @return SzResponse
     * @throws SzException
     */
    public function execute($userId)
    {
        //获取玩家购买订单数据
        /**
         * @var SzMySqlModel    $wanbaOrderModel
         * @var WanbaOrderVoList    $orderList
         * @var WanbaOrderVo    $order
         */
        $list = array();
        $orderList = SzPersister::get()->getVoList($userId, GameConst::ORM_NAME_WANBAORDER);

        if ($orderList->getListCount() != 0){
            $list = $orderList->toArray();
        }

        return $this->buildResponse($list);
    }
}